home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / demo / wemdemo4.zip / INFO / WINEMACS.2 (.txt) < prev   
GNU Info File  |  1994-09-21  |  42KB  |  761 lines

  1. This is Info file ../info/winemacs, produced by Makeinfo-1.56 from the
  2. input file winemacs.txi.
  3. File: winemacs,  Node: Intro to File Types,  Next: Controlling the File Type,  Up: Editing Binary Files
  4. Introduction to Text and Binary Files
  5. -------------------------------------
  6.    In a standard MS-DOS text file, the end of a line is signalled with
  7. two characters, `CR' (ASCII 13) and `LF' (ASCII 10).  (Unix text files,
  8. on the other hand, signal the end of a line with just a `LF'.) In
  9. addition, any `^Z' character encountered is not to be considered part
  10. of the text, but rather marks the end of the file, and any text after
  11. it is to be ignored.  To facilitate editing both MS-DOS and Unix format
  12. text files, Win-Emacs normally treats both a `CR'/`LF' combination and
  13. a sole `LF' as marking the end of a line when reading in a text file,
  14. and ignores a `^Z' character and any characters after it.  When saving
  15. the file out to disk, a `CR'/`LF' is written at the end of each line
  16. and a `^Z' is written at the end of the file. (This means, for example,
  17. that you can convert a Unix-format text file into an MS-DOS-format text
  18. file simply by reading it into Win-Emacs and writing it out again.)
  19.    Sometimes these translations are not desirable; for example,
  20. performing the translations on a `.EXE' file is likely to corrupt the
  21. file.  When editing such a file, Win-Emacs does no translation on
  22. either input or output.
  23.    The "file type" of a file determines what sort of translation (text
  24. or binary) is to be performed when reading in and writing out a file.
  25. When editing an existing file in Win-Emacs, Win-Emacs normally
  26. determines the file type of the file by looking at its extension (for
  27. example, `.C' or `.EXE').  If it is not sure, it treats the file as
  28. text, since this is the most likely case.  When writing out a file,
  29. Win-Emacs looks at the `file-type' variable for the file's buffer.
  30. This is normally set according to the file's extension when the buffer
  31. is created, so everything stays in sync.
  32.    For easy reference, the file type of a buffer is displayed in the
  33. modeline, as either a `T' or `B' preceding the buffer's major mode.
  34. For example:
  35.      --**-Emacs: lispref.txi          (T:Texinfo)----42%---------------
  36.    indicates that the file `lispref.txi' is being edited in Texinfo
  37. major mode and the file type is Text.
  38. File: winemacs,  Node: Controlling the File Type,  Next: Lisp-Level File Type Info,  Prev: Intro to File Types,  Up: Editing Binary Files
  39. Controlling the File Type
  40. -------------------------
  41.    You can explicitly set the file type of a buffer using the command
  42. `M-x set-file-type'.  This accepts the strings `text' and `binary'.
  43. Note that `M-x set-file-type' affects the way that the file will be
  44. written out to disk, but not how it was read in, since this has already
  45. occurred by the time `M-x set-file-type' can be used.
  46.    To explicitly specify the translations to be performed when a file
  47. is read in, use the commands `M-x find-file-text' and `M-x
  48. find-file-binary'. These commands cause Win-Emacs to treat the file
  49. (and set the `file-type' variable of the file's buffer) accordingly,
  50. regardless of the file's extension.  If you just began editing a file
  51. and notice that Win-Emacs guessed the wrong file type, you probably
  52. want to type `C-x k' to kill the buffer, and then use one of the above
  53. commands to edit the file again.
  54.    It was mentioned above that, if Win-Emacs cannot determine the file
  55. type of a file from its name, it assumes the file is text.  This can be
  56. changed using the command `M-x set-default-file-type'.
  57. File: winemacs,  Node: Lisp-Level File Type Info,  Prev: Controlling the File Type,  Up: Editing Binary Files
  58. Lisp-Level File Type Information
  59. --------------------------------
  60.    This section is only of interest if you are writing Emacs-Lisp code.
  61.  - User Option: file-type
  62.      This variable holds the file type for a buffer: non-`nil' for text,
  63.      `nil' for binary.  It automatically becomes buffer-local when it is
  64.      set it any fashion.
  65.  - Command: set-file-type TYPE &optional BUFFER
  66.      This function sets the value of `file-type' for BUFFER, which
  67.      defaults to the current buffer.  When called interactively, it
  68.      accepts the strings `text' and `binary'.  When called from Lisp, it
  69.      also accepts the symbols `text' and `binary' as well as `t' and
  70.      `nil'.
  71.  - Command: set-default-file-type TYPE
  72.      This function sets the default value of `file-type'.  Its argument
  73.      is as in `set-file-type'.  The initial default value is `t', for
  74.      text.
  75.    When a file is loaded into a buffer, Win-Emacs normally sets the
  76. buffer's file type according to the name of the file (in most cases,
  77. specifically by looking at the file's extension) and performs
  78. translations accordingly as the file is read in.  This can be overridden
  79. using the commands `find-file-binary' and `find-file-text', described
  80. in the previous section.
  81.  - Variable: auto-compute-file-type-p
  82.      This variable, which defaults to `t', determines whether the
  83.      buffer's file type is set according to the name of the file. (If
  84.      set to `nil', of course, the value of `default-file-type' will be
  85.      used.)
  86.  - Variable: file-name-file-type-alist
  87.      This variable determines how a file type is obtained from a file
  88.      name.  Its format is an alist associating regular expressions with
  89.      file type values (`nil' or `t').  The alist is scanned and the
  90.      first
  91.      `file-name-file-type-alist' initially looks something like this:
  92.           (defvar file-name-file-type-alist
  93.             '(
  94.               ("\\.elc$" . nil)  ; *.elc binary
  95.               ("\\.obj$" . nil)  ; *.obj binary
  96.               ("\\.exe$" . nil)  ; etc
  97.               ("\\.com$" . nil)
  98.               ("\\.lib$" . nil)
  99.               ("/config.sys$" . nil); config.sys text
  100.               ("\\.sys$" . nil)  ; *.sys binary
  101.               ("\\.chk$" . nil)  ; *.chk binary ;; chkdsk.exe dumps this.
  102.               ("\\.zip$" . nil)
  103.               ; the rest are Windows files
  104.               ("\\.dll$" . nil)
  105.               ("\\.bmp$" . nil)
  106.               ("\\.ico$" . nil)
  107.               ("\\.res$" . nil)
  108.               ("\\.pif$" . nil)
  109.               ("\\.sym$" . nil)
  110.               ("\\.scr$" . nil)
  111.               ("\\.fon$" . nil)
  112.               ("\\.fot$" . nil)
  113.               ("\\.ttf$" . nil)
  114.               ))
  115.  - Function: find-file-name-from-file-type FILENAME
  116.      This function looks up FILENAME in `file-name-file-type-alist' and
  117.      returns the file type found (either `t' or `nil').  If FILENAME
  118.      could not be matched, the default value of `file-type' is returned.
  119.  - Function: define-file-name-file-type EXPR TYPE
  120.      This function adds a new expression to the alist
  121.      `file-name-file-type-alist'.  From now on, any file name matching
  122.      regular expression EXPR will be considered to have file type TYPE,
  123.      which should be `t' or `nil'.
  124. File: winemacs,  Node: Editing Files in Hex Mode,  Next: MS-DOS Filenames,  Prev: Editing Binary Files,  Up: More About Win-Emacs
  125. Editing Files in Hex Mode
  126. =========================
  127.    To edit a file in hex-dump mode (called "hexl-mode" in Emacs), use
  128. the command `M-x hexl-find-file'.
  129. File: winemacs,  Node: MS-DOS Filenames,  Next: Low-Level PC Functions,  Prev: Editing Files in Hex Mode,  Up: More About Win-Emacs
  130. MS-DOS Filenames
  131. ================
  132.    Under MS-DOS, filenames are composed of two parts, a base of 1 to 8
  133. characters and an extension of 0 to 3 characters, with a period used to
  134. separate the two parts. (More characters can be specified in the base
  135. and extension, but they will be ignored.) Filenames are not
  136. case-sensitive and are subject to many limitations on valid characters
  137. (for example, a colon may not appear anywhere in a filename; a period
  138. may only occur as the separator between the base and the exponent,
  139. except in the special files `.' and `..'; etc.).
  140.    Win-Emacs automatically converts all filenames to lowercase,
  141. truncates their names to follow MS-DOS constraints, and checks for
  142. invalid characters in a filename.  Drive specifications at the
  143. beginning of a filename are recognized and accepted, and drive
  144. specifications are handled correctly in such functions as
  145. `file-name-absolute-p'.  The function `expand-file-name', which
  146. converts a filename to its absolute representation, automatically
  147. inserts the proper drive specification as necessary.  In addition,
  148. slashes and backslashes are both accepted as directory separator
  149. characters; backslashes are internally converted to slashes, to be
  150. consistent with Unix.
  151.    MS-DOS filename limitations make it infeasible to duplicate the
  152. behavior of Emacs under Unix, where backup filenames are formed by
  153. appending a `~' (or a `~' and a number, for numbered backups) and
  154. auto-save filenames are formed by appending and pre-pending a `#'.
  155. Instead, Win-Emacs forms backup filenames by appending a `~' to the
  156. extension if it is fewer than 3 characters in length, and otherwise by
  157. replacing the last character in the extension with a `~'.  Numbered
  158. backups are disallowed entirely.  Auto-save filenames are formed by
  159. pre-pending a `#' to the base (removing the last character of the base
  160. if necessary) and appending a `#' to the extension just like `~' is
  161. added for backup files.
  162. File: winemacs,  Node: Low-Level PC Functions,  Prev: MS-DOS Filenames,  Up: More About Win-Emacs
  163. Low-Level PC Functions
  164. ======================
  165. * Menu:
  166. * Generating 8086 Software Interrupts::
  167. * Accessing Linear Memory Directly::
  168. File: winemacs,  Node: Generating 8086 Software Interrupts,  Next: Accessing Linear Memory Directly,  Up: Low-Level PC Functions
  169. Generating 8086 Software Interrupts
  170. -----------------------------------
  171.    8086 software interrupts can be generated using the function
  172. `int86'.  (Please note that this function bypasses the protection
  173. normally provided in E-Lisp, and can easily cause Win-Emacs, or Windows
  174. itself, to crash.) Registers are passed in and returned in a special
  175. "register" type (actually a vector of all the register values).  The
  176. function `make-register' creates a new instance of register type;
  177. `set-register-value' sets a particular register in such an instance;
  178. and `register-value' returns the value of a register in such an
  179. instance.  The `register' argument to these latter two functions is a
  180. symbol specifying the register to be set or whose value is to be
  181. retrieved, and can be one of the standard 8086 registers `ax', `bx',
  182. `cx', `dx', `si', `di', `flags', `al', `ah', `bl', `bh', `cl', `ch',
  183. `dl', `dh', or `cflag' for the carry flag.
  184.    As an example, the following C code to determine the
  185. currently-selected drive:
  186.      int
  187.      GetDisk ()
  188.      {
  189.          union REGS regs;
  190.          regs.h.ah = 0x19;     /* 25 */
  191.          int86 (0x21 /* 33 */, ®s, ®s);
  192.          return regs.h.al;
  193.      }
  194.    may be written in Win-Emacs as follows:
  195.      (defun get-disk ()
  196.        (let ((regs (make-register)))
  197.          (set-register-value regs 'ah 25)    ; 0x19
  198.          (int86 33 regs)                     ; 0x21
  199.          (register-value regs 'al)))
  200. File: winemacs,  Node: Accessing Linear Memory Directly,  Prev: Generating 8086 Software Interrupts,  Up: Low-Level PC Functions
  201. Accessing Linear Memory Directly
  202. --------------------------------
  203.    The E-Lisp functions `win-peek-linear-memory' and
  204. `win-poke-linear-memory' can be used to directly access and change any
  205. location in the linear memory of the current virtual machine.  Only use
  206. these functions when absolutely necessary.
  207. File: winemacs,  Node: Other Packages,  Next: Customization,  Prev: More About Win-Emacs,  Up: Top
  208. Other Packages
  209. **************
  210.    Many other interesting packages come with Win-Emacs, and a huge
  211. number of other ones are available by FTP at
  212.      archive.cis.ohio-state.edu:/pub/gnu/emacs/elisp-archive
  213.    Here is a partial list of the packages included with Win-Emacs and
  214. the commands or variables to access them.  If a filename is listed (e.g.
  215. `autoinsert'), it means you must use `M-x load-library' to load the
  216. file before accessing the package.  Otherwise, it will be loaded
  217. automatically when you first use the associated command.
  218.    Note that many of the packages below have auxiliary commands and
  219. variables that control more precisely how to package behaves.  These
  220. commands and variables usually have names related to the package's
  221. name, and you can find them out using `M-x apropos' once the package is
  222. loaded.
  223. `M-x change-log-mode'
  224. `M-x add-change-log-entry'
  225.      Conveniently maintain a log of changes to a product.
  226. `M-x apropos'
  227. `M-x super-apropos'
  228.      List all the symbols (i.e. commands, variables, etc.) that match a
  229.      specified regular expression.  `M-x super-apropos' also looks
  230.      through the documentation strings for the symbols.
  231. `M-x array-mode' in `array'
  232.      Edit a two-dimensional array of strings in a buffer.
  233. variable `auto-insert-alist' in `autoinsert'
  234.      Automatically insert text into a file when it's created.  The text
  235.      inserted depends on the extension of the file, similarly to how
  236.      the correct mode is determined for a file using AUTO-MODE-ALIST.
  237. variable `big-menubar' in `big-menubar'
  238.      An alternative menubar that contains many more entries than the
  239.      standard one.  Loading this file automatically makes the big
  240.      menubar current.
  241. `blink-paren' package
  242.      Loading this package causes the associated parenthesis (brace,
  243.      bracket, etc.) to blink when the cursor is sitting on the matching
  244.      one.
  245. `C-x C-b' or `M-x buffer-menu'
  246.      Display a list of buffers.  Allows you to manipulate them singly
  247.      or in groups.
  248. `M-x calendar'
  249. `M-x diary'
  250. `M-x holidays'
  251. `M-x phases-of-moon'
  252. `M-x sunrise-sunset'
  253. etc. (`calendar' package)
  254.      The `calendar' package consists of functions that display a
  255.      three-month calendar, manage diary entries and appointments, list
  256.      the holidays and phases of the moon around the current date,
  257.      compute the sunrise and sunset times for a specified latitude and
  258.      longitude, and do many other related things.  See the on-line
  259.      documentation for details.
  260. `M-x list-command-history'
  261. `M-p' and `M-n' while in the minibuffer.
  262. `C-x ESC' or `M-x repeat-complex-command'
  263. `M-x repeat-matching-complex-command'
  264.      List recent minibuffer commands.  You can edit and redo any
  265.      particular command.  You can also scroll through recent minibuffer
  266.      commands by using `M-p' and `M-n' while in the minibuffer, or use
  267.      `C-x ESC' or `M-x repeat-matching-complex-command' to repeat the
  268.      most recent or a specified minibuffer command.
  269. `M-x compare-windows'
  270.      Compare the text in the current window with the next window.
  271. `M-x compile'
  272.      Run a compiler.  For more information, *Note compile/grep/diff::.
  273. `completer' package
  274.      Loading this package causes a smarter completion mechanism for
  275.      files and symbols to be installed.  For example, `M-x l-c-h' will
  276.      automatically be converted to `M-x list-command-history'.
  277. `crypt' package
  278.      Loading this package causes encrypted and compressed files to be
  279.      recognized and automatically encoded/decoded when you visit and
  280.      save the file.
  281. `M-/' or `M-x dabbrev-expand'
  282.      Dynamically expand a prefix by looking for preceding words in the
  283.      text (or following words, if no preceding words are found) that
  284.      contain this word as a prefix.
  285. `C-x d' or `M-x dired'
  286.      "Edit" a specified directory - i.e. delete, rename, print, etc.
  287.      some files in it.  This is also invoked when you use `C-x C-f' or
  288.      `M-x find-file' and enter a directory name.
  289. `M-x edebug-defun' in `edebug'
  290.      `edebug' is a source-level debugging package for Emacs-Lisp code.
  291.      `M-x edebug-defun' places a breakpoint at the beginning of the
  292.      function before point and lets you trace through the function.
  293.      See the on-line documentation for details.
  294. `M-x emerge-files' in `emerge'
  295. `M-x emerge-files-with-ancestor' in `emerge'
  296. `M-x emerge-buffers' in `emerge'
  297. `M-x emerge-buffers-with-ancestor' in `emerge'
  298.      Merge two files or buffers together, with or without a common
  299.      ancestor.
  300. `M-x evi'
  301.      Make Emacs emulate the popular VI editor under Unix.
  302. `M-.' or `M-x find-tag'
  303. `M-,' or `M-x tags-loop-continue'
  304.      Visit the file where a specified symbol (function, global variable,
  305.      etc.) is defined and jump to its definition.  Uses a `TAGS' file
  306.      that is generated by the auxiliary program `etags'.  `M-.' finds
  307.      the first occurrence and `M-,' loops through each other
  308.      occurrence.  See the on-line documentation for details.
  309. `M-x font-lock-mode'
  310.      Dynamically add syntax highlighting to your code.  See *Note
  311.      Syntax Highlighting:: for details.
  312. `M-x hexl-find-file'
  313.      Edit a file in hex-dump mode.
  314. `M-x info'
  315.      Enter the on-line documentation browser.  Also available as the
  316.      `Info' item on the `Help' menu.
  317. `M-x list-options'
  318. `M-x edit-options'
  319.      Display or edit a list of user-settable options.
  320. `M-x edit-picture'
  321.      Edit your text as a picture instead of as normal text.
  322. `saveconf' package
  323.      Automatically save and restore the context (i.e. the window
  324.      configuration and the files that were being visited in them) when
  325.      Emacs exits and starts up again.  See the sample `emacs.ini' file
  326.      to find out how to use this.
  327. `session' package
  328.      Loading this file in your `emacs.ini' file causes the last file
  329.      you visited to be reloaded at start-up.  This is a simpler version
  330.      of the `saveconf' package.
  331. `M-x display-time'
  332.      Display the current time in the modeline.
  333.    Win-Emacs also includes some games that you can play and other
  334. diversions for when you are tired of working.
  335. `M-x blackbox' in `blackbox'
  336.      "Blackbox" game.  For details, see the documentation for this
  337.      function.
  338. `M-x conx'
  339. `M-x conx-buffer'
  340. `M-x conx-region'
  341.      Creatively mangle your text.  Use `M-x conx-buffer' or `M-x
  342.      conx-region' to scarf some words, and then `M-x conx' to generate
  343.      the mangled text.
  344. `M-x dissociated-press'
  345.      Creatively rearrange your text.  Similar to `M-x conx'.
  346. `M-x doctor'
  347.      Let Emacs psychoanalyze you.
  348. `M-x flame' in `flame'
  349.      Generate random flames.
  350. `M-x psychoanalyze-flamer' in `flame'
  351.      Let Emacs psychoanalyze the flame generator.
  352. `M-x gomoku' in `gomoku'
  353.      Play Gomoku (similar to Go) with Emacs.  For details, see the
  354.      documentation for this function.
  355. `M-x hanoi'
  356.      Demonstration of the famous "Towers of Hanoi" problem.
  357. `M-x life' in `life'
  358.      John Conway's mathematical game of Life.
  359. `M-x spook' in `spook'
  360.      Add random national-security-sensitive words to your text.
  361. `M-x studlify-word' in `studly'
  362. `M-x studlify-region' in `studly'
  363. `M-x studlify-buffer' in `studly'
  364.      Add Studly capitalization to a word, region, or buffer.
  365. `M-x yow'
  366.      Return a Zippy quotation.
  367. `M-x psychoanalyze-pinhead'
  368.      Let Emacs psychoanalyze Zippy.
  369. File: winemacs,  Node: Customization,  Next: More Documentation,  Prev: Other Packages,  Up: Top
  370. Customization
  371. *************
  372. * Menu:
  373. * Initialization Files::
  374. * Specifying Colors::
  375. * Specifying Fonts::
  376. * Binding Keys::
  377. File: winemacs,  Node: Initialization Files,  Next: Specifying Colors,  Up: Customization
  378. Initialization Files
  379. ====================
  380.    The operation of Win-Emacs can be controlled by initialization files
  381. located in the directory specified in the environment variable
  382. `EMACSHOME', or `HOME' if `EMACSHOME' does not exist, or in `c:\' if
  383. neither environment variable exists.  The most commonly used startup
  384. files are `emacs.ini' and `xdefault.ini'.  It is not necessary for
  385. either file to exist; Win-Emacs provides reasonable defaults for all
  386. configurable options.
  387. * Menu:
  388. * emacs.ini::           E-Lisp commands executed at startup.
  389. * xdefault.ini::        Default colors, fonts, etc.
  390. * xmodmap.ini::         Remap the mouse buttons.
  391. File: winemacs,  Node: emacs.ini,  Next: xdefault.ini,  Up: Initialization Files
  392. The file `emacs.ini'
  393. --------------------
  394.    The file `emacs.ini' contains arbitrary Emacs-Lisp code to be
  395. executed at startup and is the equivalent of the Unix `.emacs' file.
  396. Keys can be rebound, options can be set, etc.  For example:
  397.      (global-set-key "\C-x\C-j" 'goto-line)
  398.    causes the key sequence `C-x C-j' (`C-x' is Emacs lingo for
  399. `Control-x'; similarly, `M-x' means `Meta-x', which in Win-Emacs means
  400. press `Alt-x' or `ESC x') to execute the Emacs-Lisp command
  401. `goto-line', which will prompt for a line number to move to.  For more
  402. information on Emacs commands, *Note More Documentation::.
  403.    For compatibility with earlier versions of Win-Emacs, E-Lisp commands
  404. will also be loaded out of the file `_emacs' if it exists.  You should
  405. not use this, however; use `emacs.ini' instead.
  406. File: winemacs,  Node: xdefault.ini,  Next: xmodmap.ini,  Prev: emacs.ini,  Up: Initialization Files
  407. The file `xdefault.ini'
  408. -----------------------
  409.    The file `xdefault.ini' allows the startup fonts, colors, and other
  410. graphical options (called "resources") to be specified.  (This is
  411. equivalent to the X Windows `.Xdefaults' file and has the same format.)
  412. Each line of this file specifies a resource pattern and a value,
  413. separated by a colon.
  414. * Menu:
  415. * Intro to Resources::          How to specify graphics options.
  416. * Win-Emacs Resources::         List of options you can specify.
  417. File: winemacs,  Node: Intro to Resources,  Next: Win-Emacs Resources,  Up: xdefault.ini
  418. Introduction to Resources
  419. .........................
  420.    A "resource pattern" is either the name of a resource or a wildcard
  421. specification (matching a number of resources), similar to a wildcard
  422. filename specification.  The resources themselves are named
  423. hierarchically, similar to names in the file system.  As a hypothetical
  424. example, consider a program named `Quark'.  This program might have a
  425. resource to specify the language that messages should be printed out
  426. in, and its name might be `Quark.language'.  Then, a simple resource
  427. specification might be
  428.      Quark.language: Swahili
  429.    Quark might also have resources to control its colors, fonts, etc.
  430. Perhaps this program has a menubar, a display area, an edit area, an
  431. error area, etc.  Each of these areas can have its own font, foreground
  432. color, background color, size, and so on.  In such a case, a sub-level
  433. would probably be used; then there would exist resources
  434. `Quark.menubar.font', `Quark.menubar.foreground',
  435. `Quark.menubar.background', `Quark.display.font',
  436. `Quark.display.foreground', `Quark.display.background', etc.  If you
  437. want to set the display area's foreground color to dark green, then you
  438. could say
  439.      Quark.display.foreground: dark green
  440.    What if you wanted to set all foreground colors at once?  Then you
  441. could say
  442.      Quark*foreground: red
  443.    The asterisk substitutes for zero or more levels in between; thus it
  444. would set resources called `Quark.display.foreground' and
  445. `Quark.menubar.foreground' and `Quark.error_area.foreground', and also
  446. `Quark.grapher.menubar.foreground' and
  447. `Quark.grapher.error_area.foreground' and so on.
  448.    What if you wanted to set all foreground colors to red, *except*
  449. that you wanted the display area to be dark green?  Then you would say
  450. something like:
  451.      Quark*foreground: red
  452.      Quark.display.foreground: dark green
  453.    The more specific pattern overrides the more general one. (The same
  454. thing would happen if you reversed the order of the above two lines.
  455. The order of lines in `xdefault.ini' doesn't matter.)
  456. File: winemacs,  Node: Win-Emacs Resources,  Prev: Intro to Resources,  Up: xdefault.ini
  457. Win-Emacs Resources
  458. ...................
  459.    Win-Emacs has resources that control foreground colors, background
  460. colors, fonts, cursor colors, cursor shapes, and so on.  A particular
  461. screen (i.e. top-level Windows window) can have its characteristics
  462. specified individually, according to the name of the screen; so can a
  463. particular face, or a particular face on a particular screen.  (By
  464. default all screens are named `emacs', so differentiating by screens
  465. isn't too useful unless you change a screen's name.  This will become
  466. more useful when features like `info' are modified to use their own
  467. screens.) The application name of Win-Emacs is `Emacs'.  Wildcard
  468. resource patterns should always be used, because the actual
  469. fully-qualified resource names may change from release to release.
  470.    For example, to set the font of all screens, you could say:
  471.      Emacs*font: Courier-12
  472.    To set the font on a screen named `myscreen', you could say:
  473.      Emacs*myscreen*font: Courier-12
  474.    To set the background of the modeline face, you could say:
  475.      Emacs*modeline*attributeBackground: goldenrod
  476.    See the file `NEWS' in the `etc' subdirectory for more information
  477. about specific resources.
  478. File: winemacs,  Node: xmodmap.ini,  Prev: xdefault.ini,  Up: Initialization Files
  479. The file `xmodmap.ini'
  480. ----------------------
  481.    This file allows the mapping between logical and physical pointer
  482. buttons to be changed (see also *note Remapping the Pointer::.).  The
  483. format of this file is the same as a standard `.xmodmaprc' file under X
  484. (i.e. input to the `xmodmap' command).  Comments are specified by
  485. beginning a line with a `!', and lines beginning with keywords are
  486. directives that specify mappings.  Currently the only directive that is
  487. processed is the `pointer' directive.  For example, the directive
  488.      pointer = 1 3 2
  489.    assigns logical button 1 to the left mouse button, logical button 3
  490. to the middle mouse button, and logical button 2 to the right mouse
  491. button.  This way, for example, the middle mouse button would bring
  492. down a popup menu and the right mouse button would insert the selected
  493. text at the current mouse position.
  494. File: winemacs,  Node: Specifying Colors,  Next: Specifying Fonts,  Prev: Initialization Files,  Up: Customization
  495. Specifying Colors
  496. =================
  497.    A color value is represented internally as a triple of numbers (R,
  498. G, B), specifying (respectively) the intensity of the red, green, and
  499. blue components of the color.  Each number can be between 0 and 255,
  500. with higher values corresponding to brighter colors.
  501.    When Win-Emacs expects you to specify a color, you can do it in one
  502. of two ways: either by giving the RGB values directly or by using a name
  503. (such as `red' or `forest green') that Win-Emacs recognizes.  The
  504. recognized color names are listed in the file `rgb.txt' in the `bin'
  505. subdirectory.  Each line in this file lists the R, G, and B values of
  506. the color followed by its name, which is not case sensitive.  You can
  507. modify this file and add your own color names.
  508.    To specify an RGB value directly, use the format `#RGB' or
  509. `#RRGGBB', where each letter represents a single hexadecimal digit.
  510. For example, the specification `#CAA520' represents the RGB triple
  511. (0xCA, 0xA5, 0x20) or (218, 165, 32) in decimal. (This is equivalent to
  512. the color `goldenrod' in `rgb.txt'.) The format `#RGB' is equivalent to
  513. `#R0G0B0': e.g. `#6A3' is the same as `#60A030', which is the RGB
  514. triple `(0x60, 0xA0, 0x30)' or `(96, 160, 48)' in decimal.
  515. File: winemacs,  Node: Specifying Fonts,  Next: Binding Keys,  Prev: Specifying Colors,  Up: Customization
  516. Specifying Fonts
  517. ================
  518.    Font names may be specified in one of two ways: A simplified method
  519. that is specific to Win-Emacs, or the standard X/Windows way.  Under
  520. most circumstances, you will want to use the simplified method, because
  521. it is more intuitive.
  522. * Menu:
  523. * Simplified Font Form::    The easy way to specify fonts.
  524. * X/Windows Font Form::     The hard, X-compatible way.
  525. * Font Names::              The actual fonts you can use.
  526. File: winemacs,  Node: Simplified Font Form,  Next: X/Windows Font Form,  Up: Specifying Fonts
  527. Simplified Font Form
  528. --------------------
  529.    Fonts can be specified using a simplified form, which is one of the
  530. following:
  531.      NAME-SIZE
  532.      NAME-SIZE-italic
  533.      NAME-SIZE-bold
  534.      NAME-SIZE-bold-italic
  535.      NAME-SIZE-demibold
  536.      NAME-SIZE-demibold-italic
  537.    where NAME is the font family (e.g. `Courier') and SIZE is the size
  538. in points.  For example, `Courier-12' specifies a 12-point
  539. medium-weight upright Courier font and `Fixedsys-9-bold' specifies a
  540. 9-point bold-weight upright Fixedsys font.
  541. File: winemacs,  Node: X/Windows Font Form,  Next: Font Names,  Prev: Simplified Font Form,  Up: Specifying Fonts
  542. X/Windows Font Form
  543. -------------------
  544.      (same as "-*-Courier-medium-r-*-*-*-120-*-*-*-*-*")
  545.    Fonts can also be specified in the standard X/Windows format.  You
  546. probably do not need to use this format except under special
  547. circumstances, unless you wish to be compatible with X/Windows.  Fonts
  548. in X/Windows have long names that begin with a dash, such as
  549.      -adobe-courier-medium-r-normal--12-120-100-100-m-100-iso-8859-1
  550.    The sections of the font name have meanings as follows:
  551.      -[1]-[2]-[3]-[4]-[5]-[6]-[7]-[8]-[9]-[10]-[11]-[12]-[13]
  552.    where
  553.      [1] = foundry that produced the font
  554.      [2] = font family name
  555.      [3] = weight (`medium' or `bold' or `demibold')
  556.      [4] = slant (`r' (upright) or `o' (oblique) or `i' (italic))
  557.      [5] = set width (usually `normal'; could be `semicondensed',
  558.      `condensed', `narrow', `double width', etc.)
  559.      [6] = serif (blank or `sans')
  560.      [7] = pixels
  561.      [8] = points (in tenths of a point)
  562.      [9] = horizontal resolution in dpi
  563.      [10] = vertical resolution in dpi
  564.      [11] = spacing (`m' (monospace) or `p' (proportional))
  565.      [12] = average width (in tenths of a pixel)
  566.      [13] = character set (usually `iso8859-1')
  567.    Specifying fonts in this fashion gives a great deal of information
  568. about the font.  However, it's rather inconvenient to have to specify
  569. long names like this, so X provides a wildcarding mechanism.  Whenever
  570. a font is called for, a "font specification" can be given where an
  571. asterisk substitutes for 0 or more characters in a font name, very
  572. similar to wildcards in a filename.  For example, under X the font
  573. specification
  574.      -*-courier-medium-r-*-120-*    (** DOES NOT WORK IN WIN-EMACS **)
  575.    matches the fully-qualified font name given above, and also matches
  576. any other Courier 12-point medium upright font that exists on the
  577. system.
  578.    Win-Emacs supports font specifications; however, its wildcarding
  579. mechanism is incomplete, and an asterisk can only be used to substitute
  580. for exactly one section of the font name.  For example, the font
  581. specification
  582.      -*-courier-medium-r-*-*-*-120-*-*-*-*-*    (** WORKS IN WIN-EMACS **)
  583.    is equivalent to the one above and is valid under Win-Emacs.
  584.    (This restriction is likely to be removed in a future release.)
  585.    Notes about particular sections:
  586.      Under X/Windows, the "foundry" is the corporation that designed the
  587.      font.  Under Win-Emacs, the foundry is one of `raster', `vector',
  588.      or `TrueType', specifying the type of font.  Raster fonts are
  589.      stored as bitmaps and are designed for a particular size, but can
  590.      be scaled up in integral multiples of this size.  Vector fonts are
  591.      an old type of fonts, not used much any more, that are arbitrarily
  592.      scalable but very slow to draw.  TrueType fonts are a new type of
  593.      fonts present starting in Windows 3.1, that are fast and are
  594.      arbitrarily scalable to different sizes.
  595.      Under Win-Emacs, there is no difference between `italic' and
  596.      `oblique'.
  597.      The set width is always `normal' under Win-Emacs.
  598.      The serif is always blank, even for sans-serif fonts, because
  599.      Win-Emacs cannot determine whether a font has serifs or not.
  600.      A "point" is a unit approximately equal to 1/72 of an inch.
  601. File: winemacs,  Node: Font Names,  Prev: X/Windows Font Form,  Up: Specifying Fonts
  602. Font Names
  603. ----------
  604.    The following fixed-width font names and sizes come standard with
  605. Windows:
  606.    * Courier (10-point, 12-point, 15-point)
  607.    * Courier New (any point size)
  608.    * Fixedsys (9-point)
  609. File: winemacs,  Node: Binding Keys,  Prev: Specifying Fonts,  Up: Customization
  610. Binding Keys
  611. ============
  612.    Win-Emacs allows for extremely flexible customization of key
  613. bindings.  Almost any "chord", or combination of a key with zero or
  614. more of the Control, Meta, ("Alt" or "Esc"), and Shift modifiers, can
  615. be bound separately from any other chord.  Bindings are not limited to
  616. key/modifier combinations that have ASCII character representations.
  617. Chords can be bound to an arbitarily long sequence of other chords, to
  618. an arbitary Emacs-Lisp function, or to nothing at all.  Furthermore, a
  619. sequence of chords can have its own binding if all but the last chord
  620. in the sequence is defined as a "prefix".  For example, `C-x' is
  621. usually a prefix, allowing the sequence `C-x C-f' to be bound to the
  622. Emacs-Lisp function `find-file'. (See the Emacs-Lisp documentation for
  623. detailed information about prefixes.)
  624. File: winemacs,  Node: More Documentation,  Next: Bugs/Help/Crashes,  Prev: Customization,  Up: Top
  625. Where to Look for More Documentation
  626. ************************************
  627.    * There is extensive on-line documentation (called "Info"), which
  628.      can be retrieved from within Emacs by choosing the `Info' option
  629.      from the `Help' menu or by typing `C-h i'.  This documentation
  630.      explains how to use Win-Emacs as an editor, how to program in
  631.      Emacs-Lisp, how to add more on-line documentation, and how to use
  632.      the various Emacs extensions.  The documentation in Info is
  633.      structured as hypertext, meaning that it is text that contains
  634.      links to other text.  The links are displayed in boldface and
  635.      highlight (normally in green) when you move the mouse over them.
  636.      To follow a link, just click the mouse on it.  Other commands are
  637.      available by clicking the right mouse button to bring up a pop-up
  638.      menu of commands.
  639.    * If you are unfamiliar with Emacs, you can access a guided tutorial
  640.      by choosing the `Tutorial' option from the `Help' menu or by
  641.      typing `C-h t'.
  642.    * Sample `emacs.ini' and `xdefault.ini' files are available in the
  643.      `etc' subdirectory in the Win-Emacs distribution.
  644.    * You can obtain help on a specific key or key sequence by choosing
  645.      the `Describe Key...' option from the `Help' menu or by typing
  646.      `C-h k'.  When prompted for a key, type in a key sequence (for
  647.      example, `C-x C-f').  Documentation will be displayed in a
  648.      separate window; type `C-x 1' to get rid of the window.
  649.    * Similarly, you can obtain help on a specific function by choosing
  650.      the `Describe Function...' option from the `Help' menu or by
  651.      typing `C-h f', and on a specific variable by choosing the
  652.      `Describe Variable...' option from the `Help' menu or by typing
  653.      `C-h v'
  654.    * If you are not sure of the name of a command but have some idea of
  655.      its name, you can use the `Command Apropos...' option of the
  656.      `Help' menu (also available by typing `C-h a').  This will prompt
  657.      you for a string and list all commands containing that string in
  658.      their name. (The string you enter is actually a regular
  659.      expression.)
  660.    * The file `etc/NEWS' provides specific information about Emacs 19
  661.      additions.  You can read this file conveniently by choosing the
  662.      `Emacs News' option from the `Help' menu or by typing `C-h n'.
  663. File: winemacs,  Node: Bugs/Help/Crashes,  Next: Differences From Other Emacsen,  Prev: More Documentation,  Up: Top
  664. Bugs/Help/Crashes
  665. *****************
  666.    There is extensive on-line documentation available; see the previous
  667. chapter for details.
  668.    If you think you have discovered a bug in Win-Emacs, you can send
  669. e-mail to the Win-Emacs list `win-emacs@pearlsoft.com'; others may have
  670. seen the problem and can give you advice. (The technical people at Pearl
  671. all read this list, and will respond as necessary.) This is also a very
  672. good source if you can't figure out how something works or are unclear
  673. about something.  Make sure you give an exact description of what is
  674. going on, including what you tried to do, the symptoms you see, the text
  675. of any error or warning messages you get, your hardware/software
  676. configuration (mention especially anything you have that might be
  677. unusual), and (if possible) a recipe for reproducing the problem.
  678.    You can also contact Pearl Software directly (*Note Contacting Pearl
  679. Software::).
  680.    Before you ask about a bug, however, keep in mind that the following
  681. are known limitations in the current version of Win-Emacs:
  682.    * Support for italicized and variable-width fonts is not perfect.
  683.    * Win-Emacs may not always handle resource limitations gracefully.
  684.      In some circumstances it may crash when it runs out of memory.
  685.    * Asynchronous subprocesses are not currently supported.
  686.    In order to guard against power failures and the like, Win-Emacs
  687. frequently "auto-saves" your files, meaning that it saves copies of
  688. what is in the buffer currently.  The name of the auto-save file is
  689. similar to the name of the file, but with `#' characters appended and
  690. prepended.  For example, the auto-save file for `mytest.c' would be
  691. called `#mytest.c#'. (See *note MS-DOS Filenames::. for more information
  692. on auto-save file names.)
  693.    You can recover the contents of the file from its auto-save file
  694. using the command `M-x recover-file'.  This displays the sizes and dates
  695. of the file and its auto-save file, and lets you choose whether to
  696. recover the file.  Win-Emacs will automatically remind you about using
  697. `M-x recover-file' whenever you visit a file that has an auto-save file
  698. that is more recent than the time that the file was last saved.
  699.    Any time that Win-Emacs crashes due to an internal error or is killed
  700. (e.g. when you exit Windows), it attempts to auto-save all current
  701. buffers.  If Win-Emacs crashes, you will probably see a message box that
  702. says `Fatal Error in Win-Emacs!' or `Assertion Failure'.  If so, please
  703. report the problem to Pearl Software as described above, and we will
  704. try to eliminate it as soon as possible.
  705. File: winemacs,  Node: Differences From Other Emacsen,  Next: Source Code,  Prev: Bugs/Help/Crashes,  Up: Top
  706. Differences From Other Emacsen
  707. ******************************
  708.    Please look in the file `NEWS' in the `etc' subdirectory for more
  709. information.  This file documents the differences between Emacs 18 and
  710. Lucid Emacs 19.6.
  711. File: winemacs,  Node: Source Code,  Next: Contacting Pearl Software,  Prev: Differences From Other Emacsen,  Up: Top
  712. Obtaining Source Code
  713. *********************
  714.    Source code for the Emacs DLL and for the Emacs-Lisp files can be
  715. FTP'ed from `ftp.netcom.com:/pub/pearl'.  The Emacs DLL source code is
  716. in the form of diffs; in order to construct the source files, you will
  717. need to obtain the Lucid-Emacs 19.6, X Library, and X Toolkit sources.
  718. See the `README' file at the FTP site for more information.
  719.    The full source code (not in diff form) can also be ordered from us
  720. for a shipping/handling fee.  Please contact us for more information.
  721. File: winemacs,  Node: Contacting Pearl Software,  Prev: Source Code,  Up: Top
  722. Questions, Comments, Problems, Bug Reports
  723. ******************************************
  724.    Pearl Software is reachable by e-mail at:
  725. `tech@pearlsoft.com'
  726.      For technical questions about the product (whether a particular
  727.      feature is implemented, how to use a particular package, why
  728.      something doesn't seem to work, etc.).
  729. `sales@pearlsoft.com'
  730.      How to order the product, support contracts, upgrades, etc.
  731. `info@pearlsoft.com'
  732.      This is an auto-reply message that gives an introduction to
  733.      Win-Emacs, specifies how to get it, etc.  Since this is an
  734.      auto-reply, do *not* send anything to this address that you want a
  735.      human to reply to!  It will get discarded.
  736. `listserv@pearlsoft.com'
  737.      This is Pearl Software's mail server, which allows you to obtain
  738.      files about Win-Emacs, find out about the available mailing lists,
  739.      determine which lists you're on, etc.  Keep in mind that there is
  740.      a computer on the other end of this address: Thus, you need to
  741.      send special commands that it understands.  For details, send a
  742.      one-line message containing the word word `help' to this address.
  743.    As of the writing of this guide, the following mailing lists are
  744. maintained by Pearl Software:
  745. `win-emacs@pearlsoft.com'
  746.      A general discussion group about Win-Emacs.  To subscribe, send
  747.      mail to `win-emacs-request@pearlsoft.com' containing just the word
  748.      `subscribe' in its body.
  749. `announcement@pearlsoft.com'
  750.      Group to which announcements of new releases of Win-Emacs and
  751.      similar information is sent.  To subscribe, send mail to
  752.      `announcement-request@pearlsoft.com' containing just the word
  753.      `subscribe' in its body.
  754.    You can also contact Pearl Software at
  755.      2000 Powell St.
  756.      Suite 1200
  757.      Emeryville, CA 94608
  758.      
  759.      voice: 510-652-4361
  760.      fax: 510-652-4362
  761.